<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
        <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">		
		<link href="../css/mui.min.css" rel="stylesheet" />
		
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" onclick="location='homepage.html'"></a>
		    <h1 class="mui-title">设置</h1>
		</header>
		<div class="mui-content">
			<br>
			<form>
				<div class="mui-input-group">
			    <div class="mui-input-row">
			        <label>昵称</label>
			        <input type="text" class="mui-input-clear" placeholder="输入昵称" name="username">
			    </div>
			    			    <div class="mui-input-row">
			        <label>个人简介</label>
			        <input type="text" class="mui-input-clear" placeholder="介绍你自己" >
			    </div>
				</div>
				<br>
			    <button class="btn btn-block btn-lg" onclick="setn()">保存</button>
			</form>
		</div>
	</body>
			<script src="js/mui.min.js"></script>
			<script>
				function setn(){
					var arr = document.getElementsByTagName('input');
					var username = arr[0].value;
					var profile = arr[1].value;
					if(username){
						window.localStorage.username = username;
					}
					if(profile){
						window.localStorage.profile = profile;
					}					
				}
				
				window.onload=function(){
					var arr = document.getElementsByTagName("input");
					arr[0].setAttribute("placeholder",window.localStorage.username);
					arr[1].setAttribute("placeholder",window.localStorage.profile);
				}
			</script>

</html>